package com.woniuxy.controller;

import com.woniuxy.entity.DischargeForm;
import com.woniuxy.entity.dto.AdmissionDTO;
import com.woniuxy.entity.dto.DisChargeDTO;
import com.woniuxy.service.AdmissionFormService;
import com.woniuxy.service.DischargeFormService;
import com.woniuxy.util.PageParam;
import com.woniuxy.util.ResponseData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/dischargeform")
public class DischargeFormController {
    @Autowired
    DischargeFormService service;

    @PostMapping("/querylist")
    public ResponseData queryList(@RequestBody PageParam<DisChargeDTO> pageParam){
        return service.queryList(pageParam);
    }

    @PostMapping("/updatehzdate")
    public ResponseData updateHzAndOa(@RequestBody DisChargeDTO disChargeDTO){
        return service.updateHzAndOaDate(disChargeDTO);
    }

    @PostMapping("addDischarge")
    public ResponseData<?> addDischarge(@RequestBody DischargeForm dischargeForm){
        return service.addDischarge(dischargeForm);
    }
}
